<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
        简单类型			 判断方法   存储在栈中
            String       typeof  string
            Boolean		 typeof  boolean
            Number		 typeof  number    Infinite/NaN
            Null		 === null
            Undefined	 typeof  undefined  /  === undenfined
            
        引用类型  都是对象    存储在堆中
            Array		 instanceof Array true/false
            Object
            Function	 typeof function
        */

        var str = null;
        console.log(typeof null); // object
        console.log(typeof []); // object
        console.log(str === null); // true
        console.log('hello' === null); // false
        console.log(undefined === undefined); // true
        console.log(undefined == null); // true


        // A instanceof B 	  判断A是否是B的实例（var A = new B）
        console.log('[] instancesf Object', [] instanceof Object); // true

        function fn() {
            
        }
        console.log('fn instanceof Function', fn instanceof Function); // true
        console.log('fn instanceof Object', fn instanceof Object); // true
        console.log(typeof fn); // function
    </script>
</body>
</html>